﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using FDSimpleModelGenerator.Aop;
using FDSimpleModelGenerator.Common.Enums;
using FDSimpleModelGenerator.Entities;
using FDSimpleModelGenerator.Entities.Enums;

namespace FDSimpleModelGenerator.IServices
{
    /// <summary>
    ///模型生成接口
    /// </summary>
    public interface IGenerateModelService
    {
        /// <summary>
        /// 对应数据库类型
        /// </summary>
        DbType DbType { get; }

        /// <summary>
        /// 生成模型
        /// </summary>
        /// <param name="dbConfig"></param>
        /// <param name="tableName"></param>
        /// <param name="templateContent">模板内容</param>
        /// <param name="namespaceName">命名空间</param>
        /// <param name="propertyFirstCharLower">属性首字母小写</param>
        /// <param name="languageDataType">语言数据类型</param>
        /// <returns></returns>
        [SystemLog(LogActionAfterCall = true)]
        Task<string> GenerateAsync(DbConfig dbConfig, string tableName, string templateContent, string namespaceName = "FDSimpleModelGenerator", LanguageDataType languageDataType = LanguageDataType.CSharp, bool propertyFirstCharLower = false);

        /// <summary>
        /// 生成模型
        /// </summary>
        /// <param name="dbConfig"></param>
        /// <param name="tableName"></param>
        /// <param name="templateContent">模板内容</param>
        /// <param name="namespaceName">命名空间</param>
        /// <param name="propertyFirstCharLower">属性首字母小写</param>
        /// <param name="languageDataType">语言数据类型</param>
        /// <returns></returns>
        string Generate(DbConfig dbConfig, string tableName, string templateContent, string namespaceName = "FDSimpleModelGenerator", LanguageDataType languageDataType = LanguageDataType.CSharp, bool propertyFirstCharLower = false);
    }
}
